﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace ServiceOperater.Converters
{
    // From : http://blog.csdn.net/save4me/article/details/37559065 (《改进: 简单的WPF目录树》 -- 已借鉴)
    [Obsolete("还没开始就结束了, 不过给了我一个思路")]
    public static class TreeViewItemProps
    {
        public static bool GetIsRootLevel(DependencyObject obj)
        {
            return (bool)obj.GetValue(IsRootLevelProperty);
        }

        public static void SetIsRootLevel(
            DependencyObject obj, bool value)
        {
            obj.SetValue(IsRootLevelProperty, value);
        }

        public static readonly DependencyProperty IsRootLevelProperty =
            DependencyProperty.RegisterAttached(
            "IsRootLevel",
            typeof(bool),
            typeof(TreeViewItemProps),
            new UIPropertyMetadata(false));
    }
}
